package com.kt.mes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.kt.mes.mapper.BomMapper;
import com.kt.mes.domain.Bom;
import com.kt.mes.service.IBomService;

/**
 * BOMService业务层处理
 * 
 * @author lzc
 * @date 2021-01-23
 */
@Service
public class BomServiceImpl implements IBomService 
{
    @Autowired
    private BomMapper bomMapper;

    /**
     * 查询BOM
     * 
     * @param id BOMID
     * @return BOM
     */
    @Override
    public Bom selectBomById(Long id)
    {
        return bomMapper.selectBomById(id);
    }

    /**
     * 查询BOM列表
     * 
     * @param bom BOM
     * @return BOM
     */
    @Override
    public List<Bom> selectBomList(Bom bom)
    {
        return bomMapper.selectBomList(bom);
    }

    /**
     * 新增BOM
     * 
     * @param bom BOM
     * @return 结果
     */
    @Override
    public int insertBom(Bom bom)
    {
        return bomMapper.insertBom(bom);
    }

    /**
     * 修改BOM
     * 
     * @param bom BOM
     * @return 结果
     */
    @Override
    public int updateBom(Bom bom)
    {
        return bomMapper.updateBom(bom);
    }

    /**
     * 批量删除BOM
     * 
     * @param ids 需要删除的BOMID
     * @return 结果
     */
    @Override
    public int deleteBomByIds(Long[] ids)
    {
        return bomMapper.deleteBomByIds(ids);
    }

    /**
     * 删除BOM信息
     * 
     * @param id BOMID
     * @return 结果
     */
    @Override
    public int deleteBomById(Long id)
    {
        return bomMapper.deleteBomById(id);
    }
}
